home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
9-Digit Zip Code Directory
/
9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO
/
z4src.zip
/
BS.H
< prev
next >
Wrap
C/C++ Source or Header
|
1995-07-23
|
7KB
|
398 lines
//----------------------------------------------------------------------------
// MODULE DESCRIPTION
//
// Module: bs.h
// Title: Base library
// Notice: John M. Weeder
// Copyright (c) 1993. All rights reserved.
// This module contains proprietary information and should be
// treated as confidential.
//
//----------------------------------------------------------------------------
// MAINTENANCE HISTORY
//
// $Workfile$
// $Revision$
// $Author$
// $Date$
// $Log$
//
//----------------------------------------------------------------------------
// MODULE NARRATIVE
//
//
// This module contains the main header file for the base libraries.
//
// The code in this module should be written entirely in C.
// Do not use any C++ constructs.
//
// This module is portable to:
// DOS 3.X+
// MS Windows 3.X+
// OS/2 2.X+
// OS/2 2.0 PM
// SCO UNIX.
//
// The following compilers are supported:
// MSC 6.0A
// MSC/C++ 7.0
// Borland C++ 3.1 for DOS
// Borland C++ 1.0 for OS/2 2.X
// SCO UNIX cc
//
//----------------------------------------------------------------------------
#include <base.h>
//----------------------------------------------------------------------------
// Data Types
//----------------------------------------------------------------------------
#define SYS_EXIT_PRIORITY (128) // Base library exit level
#define MAX_BASE_FILES (15) // Maximum file which can be opened!
#define FILE_BUF_SIZE (2048) // File buffer size
typedef struct _BS_HF ///// File structure
{
BOOL fUsed; // File structure used?
///// File data
BOOL fError; // Error has occurred
FPOS fpos; // File position
FLAG32 fl; // Open flags!
int handle; // File handle
///// File name/line
PCSZ pcszName; // File name
ULONG ulLine; // Line number
///// Buffered i/o
ULONG fsize;
// FPOS fsize; // Remaining size of file out for testing
SIZET cBuf; // Size of buffer
SIZET cDat; // Amount of data in buffer
SIZET cOff; // Offset of next char to use in buffer
PCSZ pcszBuf; // Buffer
///// Tokenizer flags
BOOL fIgnoreCase; // Ignore case?
BOOL fEof; // End of file?
BOOL fSof; // Start of line?
BOOL fNewLine; // Line line read in?
///// Data for current token
PSZ pszText; // Text of current token
USHORT token; // Current token value
LONG lVal; // Integer value of token
SHORT sVal; // Keyword or token value
///// Current line being tokenized
PSZ pszLine; // Current input line
PSZ psz; // Pointer to next char to process
///// Tokenizer keywords and operators
PPSZ ppszKeywords; // NULL terminated list of keywords
PPSZ ppszOperator; // NULL terminated list of operators
} BS_HF;
BASETYPE(BS_HF);
//----------------------------------------------------------------------------
// Prototypes
//----------------------------------------------------------------------------
//
// bsassert.c
//
BOOL FN AssertTest(SHORT);
//
// bsbcd.c
//
BOOL FN BcdTest(SHORT);
//
// bsboot.c
//
BOOL FN BootTest(SHORT sTest);
//
// bscmdline.c
//
#define NULOPT(x) (((x)->psz == NULL)&&((x)->pv == NULL)&&((x)->fs == 0))
#if OS_WINDOWS
VOID FN CommandLineInitialize(HINSTANCE, HINSTANCE, LPSTR, int);
#else
VOID FN CommandLineInitialize(int, char **);
#endif
BOOL FN CommandLineTest(SHORT);
//
// bscprite.c
//
BOOL FN CopyrightTest(SHORT);
//
// bscpu.c
//
BOOL FN CpuTest(SHORT);
//
// bscrc.c
//
BOOL FN CrcTest(SHORT);
//
// bscrierr.c
//
VOID FN_E CritErrInitialize(void);
VOID FN_E CritErrTerminate(void);
BOOL FN CritErrTest(SHORT);
//
// bsctrlc.c
//
VOID FN_E CtrlCInitialize(void);
VOID FN_E CtrlCTerminate(void);
//
// bsdebug.c
//
PSZ FN DebugContext(PSZ, BOOL);
SIZET FN DebugLine(void);
PCSZ FN DebugModule(void);
BOOL FN DebugTest(SHORT);
//
// bsdisp.c
//
BOOL FN DisplayTest(SHORT sTest);
//
// bsdrive.c
//
BOOL FN DriveTest(SHORT sTest);
//
// bsebcdic.c
//
BOOL FN EbcdicTest(SHORT);
//
// bsenv.c
//
BOOL FN EnvTest(SHORT);
//
// bserror.c
//
BOOL FN ErrorTest(SHORT);
//
// bsfcopy.c
//
BOOL FN CopyTest(SHORT);
//
// bsfile.c
//
PBS_HF FN FileHandle(HF);
BOOL FN_A FileIsLockingSupported(BOOL);
BOOL FN FileTerminate(void);
BOOL FN FileTest(SHORT);
//
// bsfile2.c
//
BOOL FN TextInTest(SHORT sTest);
//
// bsfile3.c
//
BOOL FN TextOutTest(SHORT sTest);
//
// bsfile4.c
//
BOOL FN FileTokenTest(SHORT);
//
// bsfinfo.c
//
BOOL FN FinfoTest(SHORT);
//
// bsfname.c
//
BOOL FN FnameTest(SHORT);
//
// bsgarble.c
//
BOOL FN GarbleTest(SHORT);
//
// bshalt.c
//
BOOL FN HaltTest(SHORT);
//
// bsheap.c
//
VOID FN_E HeapInitialize(void);
VOID FN_E HeapTerminate(void);
BOOL FN HeapTest(SHORT);
//
// bsio.c
//
VOID FN_E OutputInitialize(void);
VOID FN_E OutputTerminate(void);
BOOL FN IOTest(SHORT);
//
// bskbd.c
//
VOID FN KbdInitialize(void);
BOOL FN KbdTest(SHORT);
//
// bslev.c
//
BOOL FN LevTest(SHORT);
//
// bslog.c
//
BOOL FN_E Log_DebugV(USHORT, PCSZ, va_list);
BOOL FN_E LogClose(void);
BOOL FN_E LogOpen(void);
BOOL FN LogTest(SHORT);
//
// bsmem.c
//
BOOL FN MemTest(SHORT);
//
// bsmeta.c
//
BOOL FN MetaTest(SHORT);
//
// bsmscdex.c
//
BOOL FN MscdexTest(SHORT);
//
// bsnovell.c
//
BOOL FN NovellTest(SHORT);
//
// bsparent.c
//
BOOL FN ParentTest(SHORT);
//
// bspasswd.c
//
BOOL FN PasswordTest(SHORT);
//
// bspid.c
//
BOOL FN PidTest(SHORT);
//
// bspipe.c
//
BOOL FN PipeTest(SHORT);
//
// bsprtscr.c
//
BOOL FN PrintTest(SHORT);
//
// bsprtscr.c
//
VOID FN_E PrintScreenTerminate(void);
BOOL FN_E PrintScreenTest(SHORT);
//
// bspsize.c
//
BOOL FN ProgSizeTest(SHORT);
//
// bsquery.c
//
BOOL FN QueryTest(SHORT);
//
// bsrandom.c
//
BOOL FN RandomTest(SHORT);
//
// bsrev.c
//
BOOL FN RevisionTest(SHORT);
//
// bsserial.c
//
BOOL FN SerialTest(SHORT);
//
// bssleep.c
//
VOID FN SleepInitialize(void);
BOOL FN SleepTest(SHORT);
//
// bssound.c
//
BOOL FN SoundTest(SHORT);
//
// bsstack.c
//
VOID FN_E CheckStack(void);
VOID FN_E ClearStack(void);
//
// bsstr.c
//
BOOL FN StringTest(SHORT);
//
// bsthread.c
//
VOID FN_T TestThreadFunction(PVOID);
BOOL FN ThreadTest(SHORT);
//
// bsumb.c
//
VOID FN_E UmbRestore(void);
BOOL FN UmbTest(SHORT);
//
// bsver.c
//
BOOL FN VersionTest(SHORT);
//
// bsvollbl.c
//
BOOL FN VolLblTest(SHORT);
//
// bswrap.c
//
BOOL FN WrapTest(SHORT);
//----------------------------------------------------------------------------
//------------------------------- End of File --------------------------------
//----------------------------------------------------------------------------